var loriNotice = (function(){
	 return {
		
		//初始化
		noticeInit:function(definedSetting){
			var setting = $.extend({},this.defaultSetting,definedSetting);
			//初始化模版
			this.noticeTemplate(setting);
			//初始化样式
			this.noticeStyle(setting);
			//初始化事件
			this.noticeEvent(setting);


		},
		//模版
		noticeTemplate:function(setting){
			var html =
				"<div class='loriDialog'>"+
					"<div class='loriContent'>"+
						setting.content+
					"</div>"+
				 "</div>";
			$("body").append($(html));
		},
		//事件
		noticeEvent:function(setting){
			//自动消失
			$(".loriDialog").fadeOut(setting.timeout);
		},
		//样式设置
		noticeStyle:function(setting){
			//设置宽高,背景颜色等样式初始化
			$(".loriDialog").css({width:setting.width,height:setting.height,background:setting.backColor,color:setting.fontColor});
			//设置位置
			$(".loriDialog").css({marginTop:-$(".loriDialog").height()/2,marginLeft:-$(".loriDialog").width()/2});
		},
		//默认设置
		defaultSetting:{
			height:'160px',
			width:'260px',
			backColor:'rgba(0,0,0,0.7)',
			fontColor:'#d82222',
			content:'删除成功',
			timeout:1500
		}
	}
})();